<h1>Docker history 命令</h1>
<p><strong>docker history : </strong>查看指定镜像的创建历史。</p>
<h3>语法</h3>
<pre><code class="language-Docker">docker history [OPTIONS] IMAGE</code></pre>
<p>OPTIONS说明：</p>
<ul>
<li><p><strong>-H :</strong>以可读的格式打印镜像大小和日期，默认为true；</p><p></p></li>
<li><p><strong>--no-trunc :</strong>显示完整的提交记录；</p><p></p></li>
<li><p><strong>-q :</strong>仅列出提交记录ID。</p><p></p></li>
</ul>
<h3>实例</h3>
<p>查看本地镜像runoob/ubuntu:v3的创建历史。</p>
<pre><code class="language-Docker">

root@runoob:~# docker history runoob/ubuntu:v3

IMAGE             CREATED           CREATED BY                                      SIZE      COMMENT

4e3b13c8a266      3 months ago      /bin/sh -c #(nop) CMD ["/bin/bash"]             0 B                 

&lt;missing&gt;         3 months ago      /bin/sh -c sed -i 's/^#\s*\(deb.*universe\)$/   1.863 kB            
&lt;missing&gt;         3 months ago      /bin/sh -c set -xe   &amp;&amp; echo '#!/bin/sh' &gt; /u   701 B               

&lt;missing&gt;         3 months ago      /bin/sh -c #(nop) ADD file:43cb048516c6b80f22   136.3 MB

</code></pre>
